import 'package:ai_desktop_eidtor/common/y_button.dart';
import 'package:ai_desktop_eidtor/routes/app_page.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

import 'start_logic.dart';
import 'start_state.dart';

class StartPage extends StatelessWidget {
  const StartPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    final StartLogic logic = Get.put(StartLogic());
    final StartState state = Get.find<StartLogic>().state;

    return Container(
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.center,
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          YButton(
            text: '创建',
            onPressed: () {
              Get.toNamed(RouteName.create);
            },
          ),
          SizedBox(height: 10),
          YButton(
            text: '书籍列表',
            onPressed: () {
              Get.toNamed(RouteName.book);
            },
          ),
        ],
      ),
    );
  }
}
